#include <iostream>
#include<sstream>
#include<fstream>
#include<cstring>
using namespace std;

string tmp;
string curF;
string tmpF;
const int n=13144;	//总帧数

stringstream temp;
string tostring(int a)	//转换为字符串
{
	string tmp;
	temp << a;
	temp >> tmp;
	temp.clear();
	return tmp;
}

int main()
{
	ofstream fout("motivation.txt");
	ifstream fin;
	for (int i = 100000; i <= 100000+n; i++)          //开始与结束
	{
		curF = tostring(i).erase(0,1);
		cout << "处理总" << n << "帧中的第" << curF << "帧" << endl;           //提示帧数
		tmpF = "ASCII-Bad Apple" + curF + ".txt";        //文件名
		fin.open(tmpF);
		getline(fin, tmp);
		while (tmp != "")
		{
			fout << endl << tmp;
			getline(fin, tmp);
		}
		fin.close();
		fout << endl << "&";
	}
	return 0;
}
